package com.ruicar.afs.cloud.manage.outer.api.insurance.feign;

import com.ruicar.afs.cloud.common.core.query.QueryCondition;
import com.ruicar.afs.cloud.common.core.util.IResponse;
import com.ruicar.afs.cloud.manage.outer.api.insurance.dto.ManageInsuranceInfoDto;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * <p>Description: </p>
 *
 * @author xudongdong
 * @version 1.0
 * @date create on 2020-07-21 18:54
 */
@FeignClient(name = "insuranceForApply", url = "${com.greatwall.services.manage.url}")
public interface InsuranceForApplyFeign {

    /**
     * 获取保险业务数据 多条件
     *
     * @param insuranceClaimCondition 操作参数封装
     * @param headers                 请求头
     * @return
     * @author xudongdong
     */
    @ApiOperation("获取保险业务数据 多条件")
    @PostMapping(value = "insurance/getInsuranceInfoList")
    public IResponse getInsuranceInfoList(@RequestBody QueryCondition<ManageInsuranceInfoDto> insuranceClaimCondition, @RequestHeader Map<String, String> headers);

    /**
     * 根据合同号码、案件编号查询保险信息
     *
     * @param id      ID
     * @param headers 请求头
     * @return
     * @author xudongdong
     */
    @ApiOperation("根据合同号码、案件编号查询保险信息")
    @PostMapping(value = "insurance/getInsuranceData")
    public IResponse getInsuranceData(@RequestParam("id") Long id, @RequestHeader Map<String, String> headers);


    /**
     * 删除保险业务信息
     *
     * @param id      ID
     * @param headers 请求头
     * @return
     * @author xudongdong
     */
    @ApiOperation("删除保险业务信息")
    @RequestMapping(value = "insurance/delById/{id}", method = RequestMethod.DELETE)
    public IResponse delById(@PathVariable(value = "id") String id, @RequestHeader Map<String, String> headers);

    /**
     * 根据合同号码、案件编号获取处理意见数据
     *
     * @param caseNo  案件号, contractNo 合同号码
     * @param headers 请求头
     * @return
     * @author xudongdong
     */
    @ApiOperation("根据合同号码、案件编号获取处理意见数据")
    @PostMapping(value = "insurance/getApprovalOpinion")
    public IResponse getApprovalOpinion(@RequestParam("contractNo") String contractNo, @RequestParam("caseNo") String caseNo, @RequestHeader Map<String, String> headers);

    /**
     * 保存保险业务信息
     *
     * @param insuranceClaimCondition 操作参数封装
     * @param headers                 请求头
     * @return
     * @author xudongdong
     */
    @ApiOperation("保存保险业务信息")
    @PostMapping(value = "insurance/saveInsurance")
    public IResponse saveInsurance(@RequestBody ManageInsuranceInfoDto insuranceClaimCondition, @RequestHeader Map<String, String> headers);

    /**
     * 提交保险业务信息
     *
     * @param insuranceClaimCondition 操作参数封装
     * @param headers                 请求头
     * @return
     * @author xudongdong
     */
    @ApiOperation("提交保险业务信息")
    @PostMapping(value = "insurance/submitInsurance")
    public IResponse submitInsurance(@RequestBody ManageInsuranceInfoDto insuranceClaimCondition, @RequestHeader Map<String, String> headers);

    /**
     * 打印无章授权文件模板
     *
     * @param manageInsuranceInfo 操作参数封装
     * @param headers             请求头
     * @return
     * @author xudongdong
     */
    @ApiOperation(value = "打印无章授权文件模板")
    @PostMapping("insurance/PrintTemplate")
    public IResponse PrintTemplate(@RequestBody ManageInsuranceInfoDto manageInsuranceInfo, @RequestHeader Map<String, String> headers);

    /**
     * 打印有章授权文件模板
     *
     * @param manageInsuranceInfo 操作参数封装
     * @param headers             请求头
     * @return
     * @author xudongdong
     */
    @ApiOperation(value = "打印有章授权文件模板")
    @PostMapping("insurance/PrintHaveTemplate")
    public IResponse PrintHaveTemplate(@RequestBody ManageInsuranceInfoDto manageInsuranceInfo, @RequestHeader Map<String, String> headers);
}
